﻿@model CmsChannelVm
@{
    Layout = "~/Views/Shared/_UiLayout.cshtml";
}
@section styles{
    @if (Model.ChanIndex == "qyjj")
    {
        <link rel="stylesheet" href="/ui/css/group-profile.css" asp-append-version="true">
        <link rel="stylesheet" href="/ui/css/company-detail.css" asp-append-version="true">
    }
    @if (Model.ChanIndex == "xwzx" || Model.ChanIndex == "xxgk" || Model.ChanIndex == "rlzy")
    {
        <link rel="stylesheet" href="/ui/css/news-center.css" asp-append-version="true">
    }
    @if (Model.ChanIndex == "cpzx")
    {
        <link rel="stylesheet" href="/ui/css/group-profile.css" asp-append-version="true">
        <link rel="stylesheet" href="/ui/css/picture-list.css" asp-append-version="true">
    }
}
<div class="banner">
    <img class="banner_img" src="@Model.ChanBackground">
    <div class="banner_title">
        <h1>
            <span>
                @Model.ChanName
            </span>
        </h1>
        <div class="banner_title_line"></div>
    </div>
</div>

<div class="bread_nav">
    <span style="vertical-align:bottom;"><img src="/ui/image/home.png" /></span>
    <a href="/"  class="bread_nav_active">首页</a>
    <div class="bread_line"></div>
    <a href="/ChanUI?index=@(Model.ChanIndex)&id=@Model.Id" class="bread_nav_active">@Model.ChanName</a>
    <div class="bread_line"></div>
    <a href="javascript:void(0);" >@(Model.ChanChild.Any()?Model.ChanChild[0]?.ChanName:"")</a>
</div>

<div class="mgt30 mgb80">
    <input type="hidden" id="selectchanIndex" value="@Model.ChanIndex" />
    <div class="content_web clearfix">
        <div class="wrapper">
            <div class="left_nav fl">
                <div class="left_nav_title">
                    <h1>
                        @Model.ChanName
                    </h1>
                    <div class="left_nav_line"></div>
                </div>
                <ul class="left_nav_list">
                    @if (Model.ChanChild.Any())
                    {
                        foreach (var item in Model.ChanChild)
                        {
                            <li class="left_nav_item">
                                <a class="@(item.Id==Model.Id?"left_nav_active":"")" href="/ChanUI?index=@(item.ChanIndex)&id=@item.Id">@item.ChanName</a>
                            </li>
                        }
                    }
                </ul>
            </div>

                @if (Model.ChanIndex == "qyjj")
                {
                <div class="inner_content_right group_news fr">@await Component.InvokeAsync(typeof(CompIntrodViewComponent), new { id=Model.Id })</div>
                }

            @if (Model.ChanIndex == "xwzx" || Model.ChanIndex == "xxgk" || Model.ChanIndex == "rlzy")
            {
                <div class="inner_content_right group_news fr">@await Component.InvokeAsync(typeof(NewListViewComponent), new {id=Model.Id,pageIndx=Model.PageIndex })</div>
            }
            @if (Model.ChanIndex == "cpzx")
            {
                <div class="inner_content_right fr">@await Component.InvokeAsync(typeof(ProductViewComponent), new { id = Model.Id, pageIndx = Model.PageIndex })</div>
            }
           
        </div>
    </div>
</div>